package cn.kgc.tangcco.tcbd1011.no13.customer.service.impl;

import java.util.List;

import cn.kgc.tangcco.tcbd1011.no13.base.properties.factory.PropertiesFactory;
import cn.kgc.tangcco.tcbd1011.no13.base.util.Utils;
import cn.kgc.tangcco.tcbd1011.no13.customer.dao.CustomerDao;
import cn.kgc.tangcco.tcbd1011.no13.customer.entity.Customer;
import cn.kgc.tangcco.tcbd1011.no13.customer.service.CustomerService;

public class CustomerServiceImpl implements CustomerService {

	private CustomerDao dao;
	public CustomerServiceImpl() {
		dao = (CustomerDao) PropertiesFactory.getInstance(Utils.CUSTOMERDAO);
	}
	@Override
	public int addCustomer(Customer customer) {
		return dao.addCustomer(customer);
	}

	@Override
	public int updateCustomer(Customer customer) {
		return dao.updateCustomer(customer);
	}

	@Override
	public int deleteCustomer(int pk) {
		return dao.deleteCustomer(pk);
	}

	@Override
	public List<Customer> queryAllCustomer(Customer customer) {
		return dao.queryAllCustomer(customer);
	}

	@Override
	public Customer detailCustomer(int pk) {

		return dao.detailCustomer(pk);
	}

	@Override
	public int queryCountCustomer() {
		return dao.queryCountCustomer();
	}

}
